<?php 
if(KT!='KhiThe') exit;
class sitemap_model extends khithe_mysql{
		
	public function getMenu($tbl,$ParentID)
	{
		$ParentID = parent::checkStrMySQL($ParentID);
		$select = "SELECT * FROM ".$tbl." WHERE ParentID = '".$ParentID."' ORDER BY `Order` ASC";
		parent::CloseConnection();
		return parent::SelectMySQL($select);
	}
	
	public function getAllVal($tbl,$CatID)
	{
		$CatID = parent::checkStrMySQL($CatID);
		 
		$strlimit = '';
		$select = "SELECT * FROM ".$tbl." WHERE CategoryID = '".$CatID."' ORDER BY ID DESC ".$strlimit." ";
		parent::CloseConnection();
		return parent::SelectMySQL($select);
	}
	
	public function getMenuNews($ParentID)
	{
		$ParentID = parent::checkStrMySQL($ParentID);
		$select = "SELECT * FROM ".categorys." WHERE ParentID = '".$ParentID."' AND `Status`='true' ORDER BY `Order` ASC";
		$query = parent::SelectMySQL($select);
		return $query;
	}

	
}
?>